<script>
  import {
    mapState
  } from "vuex"
  export default {
    computed: {
      ...mapState('user', ['token'])
    },

    methods: {
      watchRouter() {
        console.log('路由跳转');
      }
    },
    onLaunch: function() {
      let that = this;
      uni.addInterceptor('navigateTo', { //监听跳转
        success(e) {
          that.watchRouter();
        }
      }) 
      // if (!this.token) {
      //   uni.reLaunch({
      //     url: 'pages/login/login',

      //   })
      // }
    },

  }
</script>

<style lang="scss">
  @import url("@/static/font/iconfont.css");
  @import '/wxcomponents/vant/common/index.wxss';
  /*每个页面公共css */
  @import '@/uni_modules/uni-scss/index.scss';
  /* #ifndef APP-NVUE */
  @import '@/static/customicons.css';
  @import "uview-ui/index.scss";

  // 设置整个项目的背景色
  page {
    background-color: #f5f5f5;
  }

  /* #endif */
  .example-info {
    font-size: 14px;
    color: #333;
    padding: 10px;
  }

  .bk {
    border: 1px solid red;
  }
</style>
